﻿namespace ProjetoModeloDDD.Infra.Data.EntityConfig
{
    using ProjetoModeloDDD.Domain.Entities;
    using System.Data.Entity.ModelConfiguration;

    public class ClienteConfiguration : EntityTypeConfiguration<Cliente>
    {
        public ClienteConfiguration()
        {
            this.HasKey(c => c.ClienteId);

            Property(c => c.Nome).IsRequired().HasMaxLength(150);
            Property(c => c.Sobrenome).IsRequired().HasMaxLength(150);
            Property(c => c.Email).IsRequired();
        }
    }
}